//
//  ZYTriangleView.swift
//  ZYOils
//
//  Created by 段新瑞 on 2019/9/25.
//  Copyright © 2019 Mr.Xr. All rights reserved.
//

import UIKit

class ZYTriangleView: UIView {
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        self.backgroundColor = .clear
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func draw(_ rect: CGRect) {
        UIColor.white.setFill()

        let path = UIBezierPath()
        path.lineCapStyle = .round
        path.lineJoinStyle = .round
        path.move(to: CGPoint.init(x: 0, y: 0))
        path.addLine(to: .init(x: 5, y: 0))
        path.addLine(to: .init(x: 2.5, y: 3))
        path.close()
        path.fill()
    }
}
